; Use string-join to simplify and make meaning explicit
authorJeremy Bryant <jb@jeremybryant.net>
Thu, 29 Feb 2024 21:47:50 +0000 (21:47 +0000)
committerJustin Burkett <justin@burkett.cc>
Sun, 3 Mar 2024 01:28:09 +0000 (20:28 -0500)
* which-key.el (which-key--butlast-string):  Replace mapconcat by string-join.

which-key.el

index 8fdafbaaabab7574f67a01d700bcca3b85b4d314..3eb27be8f100c30d6cae47dd2bcc8934a36b57cc 100644 (file)
@@ -1592,7 +1592,7 @@ Within these categories order using `which-key-key-order'."
   (if (stringp maybe-string) (string-width maybe-string) 0))
 
 (defsubst which-key--butlast-string (str)
-  (mapconcat #'identity (butlast (split-string str)) " "))
+  (string-join (butlast (split-string str)) " "))
 
 (defun which-key--match-replacement (key-binding replacement)
   ;; these are mode specific ones to ignore. The mode specific case is